﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MvcXRepairAdmin.Repository.SQL
{
    public class BaseDAO
    {
        private SqlConnection _xRepairConn;

        public BaseDAO()
        {
            var settingConn = ConfigurationManager.ConnectionStrings["xRepairConn"];

            if (settingConn != null)
            {
                _xRepairConn = new SqlConnection(settingConn.ConnectionString);
            }
            else
            {
                _xRepairConn = null;
            }
        }

        protected SqlConnection XRepairConn
        {
            get
            {
                return _xRepairConn;
            }
        }
    }
}
